///////////////////////////////////////
////            PROCESADOR         ////
///////////////////////////////////////

package practpl.cinco;

import org.antlr.runtime.ANTLRFileStream;
import org.antlr.runtime.CharStream;
import org.antlr.runtime.CommonTokenStream;

public class Procesador {
	public static void main(String args[]) throws Exception {
		CharStream fis = new ANTLRFileStream("Flex2.txt");
		CommonTokenStream tokens = new CommonTokenStream();
		Analex analex = new Analex(fis);
		
		tokens.setTokenSource(analex);
		
		System.out.println(tokens.toString());
		
//		while(tokens.getNumberOfOnChannelTokens() != Token.EOF_TYPE) {
//			System.out.println("hola entro en el while");
//			System.out.println(tokens.toString());
//			tokens = (CommonTokenStream) analex.nextToken();
//		}
		
		Anasint anasint = new Anasint(tokens);
		anasint.flex();
	}
	
}
